﻿namespace c1
{
    internal class Program
    {
        static void GetMath(int[]nums)
        {
            int max, min, sum, count;
            max = int.MinValue;
            min = int.MaxValue;
            sum = 0;
            count = 0;
            foreach(int num in nums)
            {
                if (num > max) { max = num; }
                if (num < min) { min = num; }
                sum += num;
                count++;
            }

            Console.WriteLine("Max = "+max);
            Console.WriteLine("Min = "+min);
            Console.WriteLine("Sum = "+sum);
            Console.WriteLine("Average = "+sum*1.0/count);
        }

        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
            int[] nums = { 4, 5, 7, 9, 10, 11, 12, 13 };
            GetMath(nums);

        }
    }
}
